package com.google.shop.product.config;

import com.aliyuncs.auth.AuthConstant;
import org.apache.http.client.methods.HttpDelete;
import org.apache.http.client.methods.HttpOptions;
import org.apache.http.client.methods.HttpPut;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
/* loaded from: app.jar:BOOT-INF/classes/com/google/shop/product/config/CorsConfig.class */
public class CorsConfig implements WebMvcConfigurer {
    @Override // org.springframework.web.servlet.config.annotation.WebMvcConfigurer
    public void addCorsMappings(CorsRegistry registry) {
        registry.addMapping("/**").allowedOrigins("*").allowedMethods("GET", "HEAD", "POST", HttpPut.METHOD_NAME, HttpDelete.METHOD_NAME, HttpOptions.METHOD_NAME).allowCredentials(true).maxAge(AuthConstant.TSC_VALID_TIME_SECONDS).allowedHeaders("*");
    }
}
